package com.wits.qso.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import net.sf.json.JSONObject;
import com.wits.platform.entity.BaseEntity;

@Entity
@Table(name="qso_btable_h")
public class BtableH extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3411954306875950669L;

	/** 基本课程编号	 **/
	private String id;
	
	/** 基本课程名称	 **/
	private String title;
	
	private String isEnable;
	

	@Id
	@GenericGenerator(name = "idGen", 
					strategy = "com.wits.platform.common.id.generator.IDGenerator",
					parameters={ 
								@Parameter(name = "segment_value", value = "QSO_BTABLEH_ID"), 
								@Parameter(name="table_name",value="wits_id_generator"),
								@Parameter(name="value_column_name",value="gen_value"),
								@Parameter(name="segment_column_name",value="gen_name"),
								@Parameter(name="segment_value_length",value="5"),
								@Parameter(name="sq_format",value="%03d"), 
								@Parameter(name="sq_prefix",value="BT")
					})
	@GeneratedValue(generator = "idGen")
	@Column(name = "btableh_id", nullable = false, insertable = true, updatable = false, length = 5)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name="btableh_title",length=100)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Column(name="is_enable",length=1)
	public String getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	@Override
	public String display() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String toString() {
		return JSONObject.fromObject(this,Year.getBaseJsonConfig()).toString();
	}
	

}
